package csw;

import java.util.Scanner;

public class J09Retangle {
	//메소드를 이용하여 작성
	public static void main(String[] args) {
		double width[] = new double[2];
		double height[] = new double[2];
		String color[] = new String[2];
		double Area[] = new double[2];
		double perimeter[] = new double[2];

		//면적 ,둘레 계산
		inputRetangle(width, height, color);
		getArea(Area,width,height);
		getPerimeter(perimeter,width,height);
		
		//결과 출력
		System.out.println(width[1]);
		System.out.println(height[1]);
		System.out.println(Area[1]);
		System.out.println(perimeter[1]);
		System.out.println(color[1]);
	}		
		
		//사각형 가로, 세로, 색상 입력
		public static void inputRetangle(
			double width[], double height[], String color[]){
				
			Scanner sc = new Scanner(System.in);
			System.out.println("가로는?");
			width[1] = sc.nextInt();
			System.out.println("세로는?");
			height[1] = sc.nextInt();
			System.out.println("색상은?");
			color[1] = sc.next();
			
			sc.close();

		}
		
		
		
		// 사각형의 면적 계산
		public static void getArea(
				double Area[], double width[], double height[]){
			
			Area[1] = width[1] * height[1];
		}
		
		//사각형 둘레 계산 
		public static void getPerimeter(
				double Perimeter[], double width[], double height[]){
			Perimeter[1] = (width[1] + height[1]) * 2;

		}
		
		
		
		
	}


